-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setup test with initial test cases #259
Setup test with initial test cases #259
Conversation
.travis.yml
Outdated
@@ -12,10 +12,12 @@ cache: | |||
|
|||
install: | |||
- gem install rubocop | |||
- gem install rake |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are running bundle exec rake
and rake isn't part of the Gemfile. Perhaps, add both rake and rubocop as dependencies of the Gem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gem "rake", ">= 11.1"
gem "rubocop", ">= 0.47", require: false
Thx @gauravtiwari for the feedback. Sorry that this PR take more commits than I expected. |
Gemfile
Outdated
|
||
gem "rails" | ||
gem "rake", ">= 11.1" | ||
gem "minitest", "~> 5.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets move this to :test
group -
group :test do
gem "minitest", "~> 5.0"
end
@gauravtiwari I updated the PR. |
Looks good to me @kimquy 👍 🍰 @rafaelfranca Please take a look when you have a chance. |
test/env_test.rb
Outdated
|
||
class EnvTest < Minitest::Test | ||
def test_current_env | ||
assert Webpacker::Env.current == "production" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert_equal
test/env_test.rb
Outdated
end | ||
|
||
def test_env_is_development? | ||
refute Webpacker::Env.development? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refute_predicate
test/env_test.rb
Outdated
|
||
def test_file_path | ||
correct_path = File.join(File.dirname(__FILE__), "config", "webpack", "paths.yml").to_s | ||
assert Webpacker::Env.file_path.to_s == correct_path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert_equal
end | ||
end | ||
|
||
TestApp::Application.initialize! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need an application?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rafaelfranca Yes. it needs the Application
!
No description provided.